//
//  NewsCell.m
//  HuiWenMovie
//
//  Created by niceDay on 15/7/20.
//  Copyright (c) 2015年 computer. All rights reserved.
//

#import "NewsCell.h"

@implementation NewsCell

- (void)awakeFromNib {
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Initialization code
}

- (void)setModal:(NewsModal *)modal{
    _modal = modal;
    [self setNeedsLayout];
}

- (void)layoutSubviews{
    self.backgroundColor = [UIColor blackColor];
    _title.text = _modal.title;
    _summary.text = _modal.summary;
     self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    NSString *pathStr = _modal.image;
    [_iconImageView sd_setImageWithURL:[NSURL URLWithString:pathStr]];
    if (_modal.type == 0) {
        _frontImage.image = nil;
    }
    else if (_modal.type == 1){
    _frontImage.image = [UIImage imageNamed:@"sctpxw"];
    }
    else{
        _frontImage.image = [UIImage imageNamed:@"scspxw"];

    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
